package com.wpw.spring4.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

import com.wpw.spring4.test.profile.DateSource;

@Configuration
public class ProfileBeanConfig {

	@Bean
	@Profile("dev")
	public DateSource devDateSource() {
		return new DateSource("dev dataSource");
	}
	
	@Bean
	@Profile("prod")
	public DateSource prodDateSource() {
		return new DateSource("prod dataSource");
	}
}
